import http from '@/utils/request.js'

// 用户相关API
const userApi = {
  // 用户注册
  register: (data) => {
    return http.post('/user/register', data)
  },

  // 用户登录
  login: (data) => {
    return http.post('/user/login', data)
  },

  // 用户登出
  logout: () => {
    return http.get('/user/logout')
  },

  // 用户注销
  writeOff: () => {
    return http.get('/user/writeOff')
  }
}

export default userApi 